import request from '@/utils/request';
export const operPath = {
    getQuery: '/org/group/query'
};
// 查询集团列表
export function operQuery(params) {
    return request({
        url: process.env.VUE_APP_SALEAREA_API + '/org/group/query',
        method: 'get',
        params
    });
}

// 根据id查询集团详情
export function operQueryOne(params) {
    return request({
        url: process.env.VUE_APP_SALEAREA_API + '/org/group/id/' + params,
        method: 'get',
        params
    });
}

// 查询门诊列表
export function clinicQuery(params) {
    return request({
        url: process.env.VUE_APP_SALEAREA_API + '/org/clinic/query',
        method: 'get',
        params
    });
}

// 查询医生列表
export function docQuery(params) {
    return request({
        url: process.env.VUE_APP_AID_API + '/doctor/query',
        method: 'get',
        params
    });
}

// 查询合同列表
export function contractQuery(params) {
    return request({
        url: process.env.VUE_APP_PRODUCT_API + '/oper/contract/query',
        method: 'get',
        params
    });
}

// 合同修改
export function contractUpdate(data) {
    return request({
        url: process.env.VUE_APP_PRODUCT_API + '/oper/contract/update',
        method: 'post',
        data
    });
}
// 增加
export function operAdd(data) {
    return request({
        // /org/group/create
        url: process.env.VUE_APP_SALEAREA_API + '/org/group/create',
        method: 'post',
        data
    });
}
// 编辑
export function operEdit(data) {
    return request({
        // /org/group/create
        url: process.env.VUE_APP_SALEAREA_API + '/org/group/update',
        method: 'post',
        data
    });
}
// 根据集团编号查询
export function operSearchId(params) {
    return request({
        // /org/group/create
        url: process.env.VUE_APP_SALEAREA_API + '/org/group/id/' + params,
        method: 'get'
    });
}
// // 根据集团编号查询诊所
export function clinicGroupIdSerach(params) {
    return request({
        // /org/group/create
        // /org/clinic/queryIdByGroupId/{groupId}
        url: process.env.VUE_APP_SALEAREA_API + '/org/clinic/queryIdByGroupId/' + params,
        method: 'get'
    });
}
// // 根据集团编号查询诊所
export function adminAdd(data) {
    return request({
        // /org/group/create
        // /org/clinic/queryIdByGroupId/{groupId}
        url: process.env.VUE_APP_SALEAREA_API + '/org/groupUser/create',
        method: 'post',
        data
    });
}
//集团编号查询管理员
export function adminGroupIdSerach(params) {
    return request({
        url: process.env.VUE_APP_SALEAREA_API + '/org/groupUser/query',
        method: 'get',
        params: params
    });
}
// 增加诊所
export function clinicAdd(data) {
    return request({
        // /org/group/create
        url: process.env.VUE_APP_SALEAREA_API + '/org/clinic/create',
        method: 'post',
        data
    });
}
// 查询对账单明细
export function billingQuery(params) {
    return request({
        url: process.env.VUE_APP_PRODUCT_API + '/oper/billing/query/queryPage',
        method: 'get',
        params
    });
}

// 全部订单管理
export function orderAccPage(params) {
    return request({
        url: process.env.VUE_APP_ORDER_API + '/order/acc/page',
        method: 'get',
        params
    });
}

// 待核对账单分页查询
export function getVerifyBill(params) {
  return request({
    url: process.env.VUE_APP_PRODUCT_API + '/oper/billing/query/page',
    method: 'get',
    params
  });
}

// 待核对账单 - 导出数据
export function getDownloadVerifyBill(params) {
  return request({
    url: process.env.VUE_APP_PRODUCT_API + '/oper/billing/query/download',
    method: 'get',
    params
  });
}

// 待核对账单 - 对账
export function getCheckingBill(params) {
  return request({
    url: process.env.VUE_APP_PRODUCT_API + '/oper/billing/business/checking',
    method: 'post',
    params
  });
}

// 待核对账单 - 反记
export function clearBillingBusiness(params) {
  return request({
    url: process.env.VUE_APP_PRODUCT_API + '/oper/billing/business/clear',
    method: 'post',
    params
  });
}

// 待核对账单 - 调整审核按钮-查询账单待审核明细
export function getBillingDetail(params) {
  return request({
    url: process.env.VUE_APP_PRODUCT_API + '/oper/billing/query/detail',
    method: 'get',
    params
  });
}

// 待开发票账单
export function getBillingInvoice(params) {
  return request({
    url: process.env.VUE_APP_PRODUCT_API + '/oper/billingInvoice/page',
    method: 'get',
    params
  });
}

// 待核对账单 - 导出
export function billingInvoiceDownload(params) {
  return request({
    url: process.env.VUE_APP_PRODUCT_API + '/oper/billingInvoice/download',
    method: 'get',
    params
  });
}

// 账单详情 - 信息查询
export function getBillingDetails(params) {
  return request({
    url: process.env.VUE_APP_PRODUCT_API + '/oper/billingDetails/query/'+ params,
    method: 'get'
  });
}

export default { operQuery, operQueryOne, clinicQuery, docQuery, contractQuery, billingQuery, operSearchId, operEdit, orderAccPage, getVerifyBill, getDownloadVerifyBill, getCheckingBill, clearBillingBusiness, getBillingInvoice, billingInvoiceDownload, getBillingDetail, getBillingDetails, adminGroupIdSerach };
